package edu.purdue.cs.cs505._final.server.client;

import edu.purdue.cs.cs505._final.server.Refresh;
import edu.purdue.cs.cs505._final.server.ServerStub;

public class Refresher {

	public static void main(String[] args) throws Exception {
		int n = 3;

		for (int i = 0; i < n; i++) {
			send(i);
		}
	}

	private static void send(final int i) {
		new Thread(new Runnable() {
			int n = 3;
			int k = 1;

			public void run() {

				try {
					ServerStub stub = new ServerStub(
							"http://localhost:8080/axis2/services/server" + (i));
					System.out.println("Server " + i);
					Refresh ref = new Refresh();
					ref.setIn("" + n + "," + k);
					stub.refresh(ref);
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		}).start();

	}
}
